Generate separate file for generated type models in Ruby by default#3401
Generate separate file for generated type models in Ruby by default#3401
Conversation
|
I'll change this to use the |
There was a problem hiding this comment.
Looks mostly good, just a few questions! 📝
I also had a general comment from testing: When I run Generate from the model editor, there's a log entry saying
CLI command succeeded.
No predicate found for typeVariableModel
I don't think this "typeVariableModel" is necessarily related to your changes, but I also couldn't see exactly where it's coming from 😅 (This is on the nightly CLI version, and a recent main codeql submodule checkout—but I tried a few different versions too 🤔)
| parseResults: ( | ||
| queryPath: string, | ||
| results: DecodedBqrs, | ||
| ) => ModeledMethod[] | Promise<ModeledMethod[]>; |
There was a problem hiding this comment.
Why are we getting rid of the parseResults option? 🤔
There was a problem hiding this comment.
parseResults was very specific to producing ModeledMethod[], while that's not something we want to do for this type model generation (we can just put the rows as-is into a YAML file). The only thing that parseResults was used for was await onResults(await parseResults(queryPath, bqrs)), which can very easily be replaced by await onResults(queryPath, bqrs) with very minor changes on the consumer side.
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
I believe this has been there since the beginning. The model editor doesn't support |
shati-patel
left a comment
There was a problem hiding this comment.
Thanks for the explanations ✨ Looks good!
This will generate a separate file
models/ruby.model.generated.ymlwhen running the model editor for Ruby and type models are hidden (the default). This file is ignored by the model editor, but stores all type models generated by the query. This is part of hiding type models by default.Checklist
ready-for-doc-reviewlabel there.